<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改用户</title>
  <jsp:include page="../../include.jsp"/>
    <script>
        $(function (){
            $(".btn-success").click(function (){
                $.getJSON(
                    "user?action=save",
                    $("form").serialize(),
                    function (obj){
                        if(obj){
                            alert("保存成功！");
                            location="user?action=userList";
                        }else{
                            alert("保存失败！");
                        }
                    }
                )
            })

        })
    </script>
</head>
<body>
     <div class="container">
         <font color="red">${msg}</font>
          <br>
             <form>
                 <input type="hidden" name="id" value="${user.id}">
              用户账号：<input name="username" type="text" value="${user.username}"><br>
              用户密码：<input type="text" name="password" value="${user.password}"><br>
             </form>
         <button class="btn btn-success">注册</button>
         <button class="btn btn-primary">重置</button>
     </div>
</body>
</html>
